package com.ruoyi.business.controller;

import com.ruoyi.business.domain.BusCheck;
import com.ruoyi.business.dto.CheckDto;
import com.ruoyi.business.service.BusCheckService;
import com.ruoyi.business.vo.CheckVo;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.model.LoginUser;
import com.ruoyi.common.core.page.TableDataInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 内容:
 * 作者: cy
 */

@RestController
@RequestMapping("business/check")
@Api(tags = "检查单管理接口")

public class CheckController extends BaseController {
   @Autowired
   private BusCheckService busCheckService;

   @GetMapping("list")
   @ApiOperation("分页查询检查单信息")
   public TableDataInfo getCheckPage(CheckDto checkDto){
      startPage();
      LoginUser loginUser = getLoginUser();
      List<BusCheck> checkList = busCheckService.selectCheckPage(checkDto,loginUser);
      return getDataTable(checkList);
   }

}
